package com.kun.hibernate;

import java.util.Date;
import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;

import com.kun.hibernate.domain.User;

public class Base {
	public static void main(String[] args) {
				Configuration cfg=new Configuration();
				cfg.configure();
				SessionFactory sf=cfg.buildSessionFactory();
				
				Session s=sf.openSession();
				User user=new User();
				user.setBirthday(new Date());
				user.setName("name");
				
				s.save(user);
	}

}






















